import axios from 'axios';

const instance = axios.create({
	timeout: 1000,
});

instance.interceptors.request.use(
	(config) => {
		// ....
		// console.log('before request....');

		return config;
	},
	(error) => Promise.reject(error)
);

instance.interceptors.response.use(
	(response) => {
		// console.log('before response...');
		return response.data;
	},
	(error) => Promise.reject(error)
);

export default instance;
